<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no"/>
		<title>出入站待办列表</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
		<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
		<link rel="stylesheet" href="../../script/ccssoft/css/ccssoft-lite.css" />
		<style>
			.aui-flex-col:first-child {
				height: 30px;
				line-height: 30px;
				border-bottom: 1px solid #999;
			}
			.aui-flex-col {
				height: 25px;
				line-height: 25px;
			}
			.ccssoft_list {
				background-color: #eff1f0;
				override: hidden;
			}
			.ccssoft_list {
				margin-top: 15px;
			}
			.ccssoft_list li {
				list-style: none;
				border-bottom: 1px solid #e3e2e2;
				background: #fff;
				overflow: hidden;
				margin-bottom: 10px;
			}
		</style>
	</head>
	<body>
		<div class="aui-content" id="app">
<!--			<ul class="ccssoft_list"></ul>-->
			<ul class="ccssoft_list" id="listView">
				<template v-if="dataList.length < 1"></template>
				<template v-else>
					<li class="aui-content" style="padding:8px;" v-for="(item,index) in dataList" @click="goToDetail(item)">
						<div class="aui-flex-col" style="border-bottom: 1px dashed #00a0c8;">
							<div class="aui-flex-item-8" style="font-weight: bold;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
								{{item.SITE_NAME}}
							</div>
							<div class="aui-flex-item-4 aui-text-right" style="color: rgb(44,173,101)">{{convertStatus(item)}}</div>
						</div>
						<div class="aui-flex-col" style="font-size:12px;">
							<div class="aui-flex-item-7"> {{item.ID}}</div>
							<div class="aui-flex-item-5 aui-text-right" style="color:red;font-weight: bold">{{item.ORDERRANK}}</div>
						</div>
						<div class="aui-flex-col" style="font-size:12px;">
							<div class="aui-flex-item-6">类型:{{item.TASK_TYPE_NAME}}</div>
							<div class="aui-flex-item-6 aui-text-right">解决期限:{{item.WORK_TIME_LIMIT}}</div>
						</div>
					</li>
				</template>
			</ul>
		</div>
	</body>
	<script type="text/javascript" src="../../script/jquery-1.11.3.min.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/debug.js"></script>
	<script type="text/javascript" src="../../script/constant.js"></script>
	<script type="text/javascript" src="../../script/config.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/navigate.js"></script>
	<script type="text/javascript" src="../../script/doT.min.js"></script>
	<script type="text/javascript" src="../../script/ccssoft/js/ccssoft-lite.js"></script>
	<script type="text/javascript" src="../../script/client.api.js"></script>
	<script type="text/javascript" src="../../script/aui-alert.js"></script>
	<script type="text/javascript" src="../../script/request.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/vueComponent.js"></script>
<!--	<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.1/vconsole.min.js"></script>-->
<!--	<script >-->
<!--	    var vConsole = new VConsole();-->
<!--	</script>-->
	<script type="text/javascript">
		var listView;
		var app = new Vue({
			el:'#app',
			data:function (){
				return {
					dataList:[]
				}
			},
			methods:{
				convertStatus(item){
					return this.$getWorderStatus(item.STATUS);
				},
				goToDetail(item){
					var pageParam = {};
					pageParam.billItem = item;
					pageParam.fromPage = "zcyygd/listFrm";
					api.openWin({
						name : 'detailGroupWin',
						url : 'detailGroupWin.html',
						bounces : false,
						rect : {x : 0, y : 0, w : 'auto', h : 'auto'},
						reload : true,
						pageParam : pageParam
					});
				},
			},
			mounted:function (){
			}
		});

		apiready = function() {
			request.getSelfTaskTodoList = function (opts,callback) {
				service({
					url: "/worderAssetRun/getSelfTaskTodoList.do",
					data: opts
				},callback)
			}
			listView = new C.ApiListView({
				fn : request.getSelfTaskTodoList,
				newSystem:true,
				vueProxy:true,
				callback:function(res,restart){
					if(restart){
						app.dataList = res.data.list;
					}else{
						app.dataList = app.dataList.concat(res.data.list);
					}
				}
			});

			listView.setQueryOptions({
				status:api.pageParam.type
			})

			listView.refresh();

			api.addEventListener({name: 'zcyygdAudit'}, function(ret, err) {
				if (ret.value.state === 'auditOver') {
					// alert("【资产审核完毕】要刷新了");
					listView.refresh();
				}
			});
		};
	</script>
</html>
